package com.fcml.pattern.responsibility;

/**
 * @author fcml
 * @date 2018/11/9
 */
public class ManagerHandler extends AbstractHandler {

    @Override
    public void handler(String staff, int holiday) {
        if (holiday < 8) {
            System.out.println("经理批准了" + staff + "的" + holiday + "天假。");
        } else {
            nextHandler = getNextHandler();
            if (nextHandler != null) {
                nextHandler.handler(staff, holiday);
            }
        }
    }
}
